The present invention relates to the field of computer graphics, and in particular to methods and apparatus for creating, modifying the attributes and appearance of objects in computer graphics images. Many computer graphic images are created by mathematically modeling the interaction of light with a three dimensional scene from a given viewpoint. This process, called rendering, generates a two-dimensional image of the scene from the given viewpoint, and is analogous to taking a photograph of a real-world scene. Animated sequences can be created by rendering a sequence of images of a scene as the scene is gradually changed over time. A great deal of effort has been devoted to making realistic looking and artistically compelling rendered images and animations.
In computer-generated animation, a character's appearance is defined by a three-dimensional computer model. To appear realistic, the computer model of a character is often extremely complex, having millions of surfaces and tens of thousands of attributes. Due to the complexity involved with animating such complex models, animation tools often rely on animation variables to define the character's animation.
Animation variables, which are sometimes referred to as avars, are parameters used by functions to modify the pose or bodily position of an object or character model. Animation variables and their associated functions are used to abstract complicated modifications to a character model to a relatively simple control. For example, animation variables can specify the rotation angles of the joints of a character model, thereby positioning the character model's limbs and appendages. More complicated animation variables can define the degree of opening of a character's mouth. In this example, the value of the animation variable is used to determine the position of the many different parts of the character model needed to open the characters mouth to the desired degree. The animation software tools then modify the character model according to the final posed armature to create a character model with an open mouth.
Often, it is desirable to pose geometry relative to another surface, referred to as a guide surface. For example, a surface warp operation allows model geometry to follow changes in the guide surface. As the guide surface changes shape, a surface warp operation changes other model geometry, such as another surface, to follow the change in the guide surface shape. In another example, a surface pulling operation allows the one-dimensional motion of one surface or other portion of model geometry to follow the general shape of the guide surface. In still another example, a normal translate operation moves model geometry in a direction normal to the guide surface. This allows the model geometry to be moved towards or away from the guide surface, while following the shape of the guide surface.
Animation software tools often need to perform many complex projections, transformation, and other computationally expensive operations on hundreds or thousands of particles, points, or other portions of model geometry to convert animation variable values into posed models. Previously, operations relative to the guide surface, such as the example surface warp, surface pulling, and normal translate operations, were performed using separate sequences of projections and transformations. This makes these types of operations computationally expensive to perform.
During rendering, model geometry is often divided into geometry samples, such as such as particles, polygons, micropolygons, or fragments. The camera viewpoint is used project geometry samples onto an image plane including image sample points, which correspond with pixels or sub-pixel samples. A visibility function evaluates the one or more geometry samples projected onto each image sample to determine the value, such as the color, of the image sample.
Previously, the visibility function was fixed and inflexible. Previous visibility functions determine the contribution of geometry samples to an image sample value based on their depth (i.e. distance from the camera viewpoint) and opacity. Previous visibility functions accumulate opacity and color strictly according to the depth order of geometry samples associated with an image sample.
However, deformations of geometry can introduce small errors may cause the portions of the model geometry to inadvertently pass behind the guide surface or other objects. Furthermore, many special illumination and rendering effects, such as motion blur and shadowing, may interact in visually undesirable ways. It is therefore desirable to correct for these visibility issues without having to change the geometry.
It is therefore desirable for a system and method to enable geometry to be moved and otherwise manipulated with respect to a guide surface. It is further desirable to control the visibility of objects to correct for visibility issues as well as to enable other effects.